package com.ruoyi.hr.service.impl.welfare.welfarechange;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.hr.domain.Authority;
import com.ruoyi.hr.mapper.welfare.welfarechange.WelfareChangeHistoryMapper;
import com.ruoyi.hr.service.welfare.welfarechange.WelfareChangeHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class WelfareChangeHistoryServiceImpl implements WelfareChangeHistoryService {

    @Autowired
    WelfareChangeHistoryMapper welfareChangeHistoryMapper;

    @DataSource(value = DataSourceType.SLAVE)
    @Override
    public List<Map<String, Object>> findDataWelfareChangeHistory(String startingTime, String terminationTime, String name, String badge, List<Authority> authorities, int isAdmin) {
        return welfareChangeHistoryMapper.findDataWelfareChangeHistory(startingTime, terminationTime, name, badge, authorities, isAdmin);
    }
}
